package com.imooc.utils;

import com.imooc.VO.ResultVO;

/**
 * Create By Lqz
 *
 * @date 2018/5/31 11:53
 */
public class ResultVOUtil {

	public static ResultVO success(Object object){
		ResultVO resultVO = new ResultVO();
		resultVO.setCode(0);
		resultVO.setMessage("成功");
		resultVO.setData(object);
		return resultVO;
	}


	public static ResultVO success(){
		return success(null);
	}

	public static ResultVO error(Integer code,String msg){
		ResultVO resultVO = new ResultVO();
		resultVO.setCode(code);
		resultVO.setMessage(msg);
		return resultVO;
	}

}
